import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function addTable(params) {
  return http.request<HttpResult>("post", "/admin/def/table/insert/batch", {
    data: params
  });
}

export function deleteTable(ids) {
  return http.request<HttpResult>("post", `/admin/def/table/delete/${ids}`);
}

export function updateTable(params) {
  return http.request<HttpResult>("post", "/admin/def/table/update/batch", {
    data: params
  });
}

export function createTable(params) {
  return http.request<HttpResult>("post", "/admin/def/table/db/create", {
    data: params
  });
}

export function queryTablePage(params) {
  return http.request<HttpResult>("get", "/admin/def/table/get/table", {
    params: params
  });
}
